**************************
*	Andrea Pareschi
*   Matteo Giglioli
*   Gianfranco Baldini
*	January 2022
*	Article "Caught between sovereignty and solidarity?"
*	Replication material
*   Do-file n. 1
**************************



***************
* 1) Variables of interest in the Dataset
***************



* Country
tab COUNTRY, m

* Category (mass/elite respondents)
tab TARGET2, m

* Eligibility of mass respondents (final sample)
tab w1validgp, m

* Self-positioning along positional scales
* 	General European integration
tab QE11, m
* 	Authority over economic policy
tab QB1_2, m
* 	Pooling of economic resources
tab QB1_3, m
* 	Authority over immigration policy
tab QC1_1, m
* 	Costs of providing asylum
tab QC1_2, m

* Mass perceptions of parties along positional scales
* 	Authority over economic policy
tab QB2_2, m
* 	Pooling of economic resources
tab QB2_3, m
* 	Authority over immigration policy
tab QC2_1, m
* 	Costs of providing asylum
tab QC2_2, m

* Partisan sorting (mass): vote intention
tab QG2, m
* Partisan sorting: party closeness
* 	Party closeness (spontaneous)
tab QG3, m
* 	Party closeness (squeezed, additional)
tab QG3a, m

* Partisan sorting (elites)
* 	Party of election
tab Party_of_election, m
* 	Parliamentary group affiliation 
tab Party_group, m
* 	Taken together, the two variables can be used to update politicians' affiliation ever since their election
* 	To distinguish between MPs and MEPs (ancillary variable)
tab Type_politician, m

* Sets of weights (mass)
* 	General population
tab gp_wt1_cap, m
* 	Corrected for internet users
tab int_wt1_cap, m



***************
* 2) Amending variables of interest
***************



* Recoding self-positioning along positional scales
* 	Recode "Authority over economic policy"
tab QB1_2, m
tab QB1_2 TARGET2, m
bysort COUNTRY: tab QB1_2 TARGET2, m
gen QB1_2_recoded=QB1_2
label var QB1_2_recoded "1st economic variable recoded - Authority over economic policy"
label val QB1_2_recoded QB1_2_recoded
recode QB1_2_recoded (98=.a)(.=.b)
label define QB1_2_recoded .a"Don't know" .b"Already missing" 0"0 Giving the European Union more authority over Member States� economic and budgetary policies" 1"1" 2"2" 3"3" 4"4" 5"5" 6"6" 7"7" 8"8" 9"9" 10"10 Retaining full powers for economic decision-making in each Member State", replace
numlabel, add
tab QB1_2_recoded, m
tab QB1_2_recoded TARGET2, m
bysort COUNTRY: tab QB1_2_recoded TARGET2, m
sum QB1_2_recoded, detail
bysort TARGET2: sum QB1_2_recoded, detail
bysort TARGET2 COUNTRY: sum QB1_2_recoded, detail
* 	Recode "Pooling of economic resources"
tab QB1_3, m
tab QB1_3 TARGET2, m
bysort COUNTRY: tab QB1_3 TARGET2, m
gen QB1_3_recoded=QB1_3
label var QB1_3_recoded "2nd economic variable recoded - Pooling of economic resources, Reversed"
label val QB1_3_recoded QB1_3_recoded
recode QB1_3_recoded (98=.a)(.=.b)(0=10)(1=9)(2=8)(3=7)(4=6)(5=5)(6=4)(7=3)(8=2)(9=1)(10=0)
label define QB1_3_recoded .a"Don't know" .b"Already missing" 10"10 Each country should rely on its own resources to fix its economic problems" 9"9" 8"8" 7"7" 6"6" 5"5" 4"4" 3"3" 2"2" 1"1" 0"0 The European Union's countries should pool resources to fix economic problems", replace
numlabel, add
tab QB1_3_recoded, m
tab QB1_3_recoded TARGET2, m
bysort COUNTRY: tab QB1_3_recoded TARGET2, m
sum QB1_3_recoded, detail
bysort TARGET2: sum QB1_3_recoded, detail
bysort TARGET2 COUNTRY: sum QB1_3_recoded, detail
* 	Recode "Authority over immigration policy"
tab QC1_1, m
tab QC1_1 TARGET2, m
bysort COUNTRY: tab QC1_1 TARGET2, m
gen QC1_1_recoded=QC1_1
label var QC1_1_recoded "1st immigration variable recoded - Authority over immigration policy, Reversed"
label val QC1_1_recoded QC1_1_recoded
recode QC1_1_recoded (98=.a)(.=.b)(0=10)(1=9)(2=8)(3=7)(4=6)(5=5)(6=4)(7=3)(8=2)(9=1)(10=0)
label define QC1_1_recoded .a"Don't know" .b"Already missing" 10"10 [COUNTRY] should decide for itself how many immigrants to accept each year" 9"9" 8"8" 7"7" 6"6" 5"5" 4"4" 3"3" 2"2" 1"1" 0"0 The European Union should decide how many immigrants should be accepted by each Member State each year", replace
numlabel, add
tab QC1_1_recoded, m
tab QC1_1_recoded TARGET2, m
bysort COUNTRY: tab QC1_1_recoded TARGET2, m
sum QC1_1_recoded, detail
bysort TARGET2: sum QC1_1_recoded, detail
bysort TARGET2 COUNTRY: sum QC1_1_recoded, detail
* 	Recode "Costs of providing asylum"
tab QC1_2, m
tab QC1_2 TARGET2, m
bysort COUNTRY: tab QC1_2 TARGET2, m
gen QC1_2_recoded=QC1_2
label var QC1_2_recoded "2nd immigration variable recoded - Costs of providing asylum"
label val QC1_2_recoded QC1_2_recoded
recode QC1_2_recoded (98=.a)(.=.b)
label define QC1_2_recoded .a"Don't know" .b"Already missing" 0"0 The costs of providing asylum should be shared among all the European Union's Member States" 1"1" 2"2" 3"3" 4"4" 5"5" 6"6" 7"7" 8"8" 9"9" 10"10 Each country should bear the costs depending on how many asylum seekers it receives", replace
numlabel, add
tab QC1_2_recoded, m
tab QC1_2_recoded TARGET2, m
bysort COUNTRY: tab QC1_2_recoded TARGET2, m
sum QC1_2_recoded, detail
bysort TARGET2: sum QC1_2_recoded, detail
bysort TARGET2 COUNTRY: sum QC1_2_recoded, detail
* 	Recode "General European integration"
tab QE11, m
tab QE11 TARGET2, m
bysort COUNTRY: tab QE11 TARGET2, m
gen QE11_recoded=QE11
label var QE11_recoded "General European Integration recoded - Reversed"
label val QE11_recoded QE11_recoded
recode QE11_recoded (.=.a)(98=.b)(0=10)(1=9)(2=8)(3=7)(4=6)(5=5)(6=4)(7=3)(8=2)(9=1)(10=0)
label define QE11_recoded .a"Already missing" .b"Don't know" 10"10 The unification of the EU has gone too far" 1"1" 2"2" 3"3" 4"4" 5"5" 6"6" 7"7" 8"8" 9"9" 0"0 The unification of EU should be taken further", replace
numlabel, add
tab QE11_recoded, m
tab QE11_recoded TARGET2, m
bysort COUNTRY: tab QE11_recoded TARGET2, m
sum QE11_recoded, detail
bysort TARGET2: sum QE11_recoded, detail
bysort TARGET2 COUNTRY: sum QE11_recoded, detail

* Recoding mass perceptions of parties along positional scales
* 	Recode "Authority over economic policy" - mass perceptions
tab QB2_2, m
tab QB2_2 TARGET2, m
gen QB2_2_recoded=QB2_2
label var QB2_2_recoded "Perceptions on 1st economic variable recoded"
label val QB2_2_recoded QB2_2_recoded
recode QB2_2_recoded (.=.a)(98=.b)(99=.c)
label define QB2_2_recoded .a"Missing elites and 753 others" .b"Don't know" .c"Don't feel close enough to any party" 0"0 Giving the European Union more authority over Member States� economic and budgetary policies" 1"1" 2"2" 3"3" 4"4" 5"5" 6"6" 7"7" 8"8" 9"9" 10"10 Retaining full powers for economic decision-making in each Member State", replace
numlabel, add
tab QB2_2_recoded, m
tab QB2_2_recoded TARGET2, m
bysort COUNTRY: tab QB2_2_recoded TARGET2, m
sum QB2_2_recoded, detail
bysort TARGET2: sum QB2_2_recoded, detail
bysort TARGET2 COUNTRY: sum QB2_2_recoded, detail
* 	Recode "Pooling of economic resources" - mass perceptions
tab QB2_3, m
tab QB2_3 TARGET2, m
gen QB2_3_recoded=QB2_3
label var QB2_3_recoded "Perceptions on 2nd economic variable recoded - Reversed"
label val QB2_3_recoded QB2_3_recoded
recode QB2_3_recoded (.=.a)(98=.b)(99=.c)(0=10)(1=9)(2=8)(3=7)(4=6)(5=5)(6=4)(7=3)(8=2)(9=1)(10=0)
label define QB2_3_recoded .a"Missing elites and 753 others" .b"Don't know" .c"Don't feel close enough to any party" 10"10 Each country should rely on its own resources to fix its economic problems" 9"9" 8"8" 7"7" 6"6" 5"5" 4"4" 3"3" 2"2" 1"1" 0"0 The European Union's countries should pool resources to fix economic problems", replace
numlabel, add
tab QB2_3_recoded, m
tab QB2_3_recoded TARGET2, m
bysort COUNTRY: tab QB2_3_recoded TARGET2, m
sum QB2_3_recoded, detail
bysort TARGET2: sum QB2_3_recoded, detail
bysort TARGET2 COUNTRY: sum QB2_3_recoded, detail
* 	Recode "Authority over immigration policy" - mass perceptions
tab QC2_1, m
tab QC2_1 TARGET2, m
gen QC2_1_recoded=QC2_1
label var QC2_1_recoded "Perceptions on 1st immigration variable recoded - Reversed"
label val QC2_1_recoded QC2_1_recoded
recode QC2_1_recoded (.=.a)(98=.b)(99=.c)(0=10)(1=9)(2=8)(3=7)(4=6)(5=5)(6=4)(7=3)(8=2)(9=1)(10=0)
label define QC2_1_recoded .a"Missing elites and 753 others" .b"Don't know" .c"Don't feel close enough to any party" 10"10 [COUNTRY] should decide for itself how many immigrants to accept each year" 9"9" 8"8" 7"7" 6"6" 5"5" 4"4" 3"3" 2"2" 1"1" 0"0 The European Union should decide how many immigrants should be accepted by each Member State each year", replace
numlabel, add
tab QC2_1_recoded, m
tab QC2_1_recoded TARGET2, m
bysort COUNTRY: tab QC2_1_recoded TARGET2, m
sum QC2_1_recoded, detail
bysort TARGET2: sum QC2_1_recoded, detail
bysort TARGET2 COUNTRY: sum QC2_1_recoded, detail
* 	Recode "Costs of providing asylum" - mass perceptions
tab QC2_2, m
tab QC2_2 TARGET2, m
gen QC2_2_recoded=QC2_2
label var QC2_2_recoded "Perceptions on 2nd immigration variable recoded"
label val QC2_2_recoded QC2_2_recoded
recode QC2_2_recoded (.=.a)(98=.b)(99=.c)
label define QC2_2_recoded .a"Missing elites and 753 others" .b"Don't know" .c"Don't feel close enough to any party" 0"0 The costs of providing asylum should be shared among all the European Union's Member States" 1"1" 2"2" 3"3" 4"4" 5"5" 6"6" 7"7" 8"8" 9"9" 10"10 Each country should bear the costs depending on how many asylum seekers it receives", replace
numlabel, add
tab QC2_2_recoded, m
tab QC2_2_recoded TARGET2, m
bysort COUNTRY: tab QC2_2_recoded TARGET2, m
sum QC2_2_recoded, detail
bysort TARGET2: sum QC2_2_recoded, detail
bysort TARGET2 COUNTRY: sum QC2_2_recoded, detail

* Partisan sorting (mass)
* 	Party closeness (spontaneous + squeezed): intermediary step
tab QG3, m
tab QG3a, m
gen QG3_Expanded=QG3
label var QG3_Expanded "QG3 plus QG3a"
label val QG3_Expanded QG3
replace QG3_Expanded=1 if QG3a==1
replace QG3_Expanded=2 if QG3a==2
replace QG3_Expanded=3 if QG3a==3
replace QG3_Expanded=4 if QG3a==4
replace QG3_Expanded=6 if QG3a==6
replace QG3_Expanded=7 if QG3a==7
replace QG3_Expanded=10 if QG3a==10
replace QG3_Expanded=11 if QG3a==11
replace QG3_Expanded=13 if QG3a==13
replace QG3_Expanded=14 if QG3a==14
replace QG3_Expanded=15 if QG3a==15
replace QG3_Expanded=16 if QG3a==16
replace QG3_Expanded=17 if QG3a==17
replace QG3_Expanded=19 if QG3a==19
replace QG3_Expanded=20 if QG3a==20
replace QG3_Expanded=21 if QG3a==21
replace QG3_Expanded=22 if QG3a==22
replace QG3_Expanded=24 if QG3a==24
replace QG3_Expanded=34 if QG3a==34
replace QG3_Expanded=35 if QG3a==35
replace QG3_Expanded=36 if QG3a==36
replace QG3_Expanded=38 if QG3a==38
replace QG3_Expanded=39 if QG3a==39
replace QG3_Expanded=40 if QG3a==40
replace QG3_Expanded=41 if QG3a==41
replace QG3_Expanded=42 if QG3a==42
replace QG3_Expanded=43 if QG3a==43
replace QG3_Expanded=44 if QG3a==44
replace QG3_Expanded=45 if QG3a==45
replace QG3_Expanded=46 if QG3a==46
replace QG3_Expanded=47 if QG3a==47
replace QG3_Expanded=48 if QG3a==48
replace QG3_Expanded=49 if QG3a==49
replace QG3_Expanded=50 if QG3a==50
replace QG3_Expanded=51 if QG3a==51
replace QG3_Expanded=52 if QG3a==52
replace QG3_Expanded=53 if QG3a==53
replace QG3_Expanded=54 if QG3a==54
replace QG3_Expanded=55 if QG3a==55
replace QG3_Expanded=56 if QG3a==56
replace QG3_Expanded=57 if QG3a==57
replace QG3_Expanded=58 if QG3a==58
replace QG3_Expanded=59 if QG3a==59
replace QG3_Expanded=60 if QG3a==60
replace QG3_Expanded=61 if QG3a==61
replace QG3_Expanded=62 if QG3a==62
replace QG3_Expanded=63 if QG3a==63
replace QG3_Expanded=64 if QG3a==64
replace QG3_Expanded=65 if QG3a==65
replace QG3_Expanded=66 if QG3a==66
replace QG3_Expanded=67 if QG3a==67
replace QG3_Expanded=68 if QG3a==68
replace QG3_Expanded=69 if QG3a==69
replace QG3_Expanded=70 if QG3a==70
replace QG3_Expanded=71 if QG3a==71
replace QG3_Expanded=72 if QG3a==72
replace QG3_Expanded=73 if QG3a==73
replace QG3_Expanded=74 if QG3a==74
replace QG3_Expanded=75 if QG3a==75
replace QG3_Expanded=76 if QG3a==76
replace QG3_Expanded=77 if QG3a==77
replace QG3_Expanded=78 if QG3a==78
replace QG3_Expanded=79 if QG3a==79
replace QG3_Expanded=81 if QG3a==81
replace QG3_Expanded=82 if QG3a==82
replace QG3_Expanded=83 if QG3a==83
replace QG3_Expanded=84 if QG3a==84
replace QG3_Expanded=86 if QG3a==86
replace QG3_Expanded=90 if QG3a==90
replace QG3_Expanded=91 if QG3a==91
replace QG3_Expanded=92 if QG3a==92
replace QG3_Expanded=93 if QG3a==93
replace QG3_Expanded=94 if QG3a==94
replace QG3_Expanded=95 if QG3a==95
replace QG3_Expanded=96 if QG3a==96
replace QG3_Expanded=97 if QG3a==97
replace QG3_Expanded=99 if QG3a==99
replace QG3_Expanded=100 if QG3a==100
replace QG3_Expanded=101 if QG3a==101
replace QG3_Expanded=102 if QG3a==102
replace QG3_Expanded=103 if QG3a==103
replace QG3_Expanded=104 if QG3a==104
replace QG3_Expanded=105 if QG3a==105
replace QG3_Expanded=106 if QG3a==106
replace QG3_Expanded=107 if QG3a==107
replace QG3_Expanded=108 if QG3a==108
replace QG3_Expanded=109 if QG3a==109
replace QG3_Expanded=110 if QG3a==110
replace QG3_Expanded=111 if QG3a==111
replace QG3_Expanded=112 if QG3a==112
replace QG3_Expanded=113 if QG3a==113
replace QG3_Expanded=115 if QG3a==115
replace QG3_Expanded=116 if QG3a==116
replace QG3_Expanded=117 if QG3a==117
replace QG3_Expanded=118 if QG3a==118
replace QG3_Expanded=119 if QG3a==119
replace QG3_Expanded=120 if QG3a==120
replace QG3_Expanded=121 if QG3a==121
replace QG3_Expanded=122 if QG3a==122
replace QG3_Expanded=123 if QG3a==123
replace QG3_Expanded=124 if QG3a==124
replace QG3_Expanded=125 if QG3a==125
replace QG3_Expanded=126 if QG3a==126
replace QG3_Expanded=127 if QG3a==127
replace QG3_Expanded=128 if QG3a==128
replace QG3_Expanded=130 if QG3a==130
replace QG3_Expanded=132 if QG3a==132
numlabel, add
tab QG3_Expanded, m
bysort COUNTRY: tab QG3_Expanded if TARGET2==2
* 	Party closeness (spontaneous + squeezed): Tailored amendments to pool together the elites of certain political forces (e.g. CDU and CSU, PP and Foro Asturias...)
gen QG3_Expanded_Rec=QG3_Expanded
label var QG3_Expanded_Rec "QG3_Expanded with Akin Parties Joined"
label val QG3_Expanded_Rec QG3
replace QG3_Expanded_Rec=22 if QG3_Expanded==35
replace QG3_Expanded_Rec=50 if QG3_Expanded==54
replace QG3_Expanded_Rec=70 if QG3_Expanded==84
replace QG3_Expanded_Rec=118 if QG3_Expanded==119|QG3_Expanded==120
replace QG3_Expanded_Rec=125 if QG3_Expanded==136|QG3_Expanded==137|QG3_Expanded==138|QG3_Expanded==141
replace QG3_Expanded_Rec=123 if QG3_Expanded==139
replace QG3_Expanded_Rec=131 if QG3_Expanded==140
numlabel, add
tab QG3_Expanded_Rec
* 	Vote intention: Tailored amendments to pool together the elites of certain political forces
gen QG2_Rec=QG2
label var QG2_Rec "QG2 with Akin Parties Joined"
label val QG2_Rec QG2
replace QG2_Rec=22 if QG2==35
replace QG2_Rec=50 if QG2==54
replace QG2_Rec=70 if QG2==84
replace QG2_Rec=118 if QG2==119|QG2==120
replace QG2_Rec=125 if QG2==136|QG2==137|QG2==138|QG2==141
replace QG2_Rec=123 if QG2==139
replace QG2_Rec=131 if QG2==140
numlabel, add
tab QG2_Rec

* Alternative specification of mass level (national population)
* 	Only those close to a party
gen PartyCloseness2=1
label var PartyCloseness2 "QG3_Expanded Recoded - National population Only those close to a party"
label val PartyCloseness2 PartyCloseness2
replace PartyCloseness2=0 if QG3_Expanded==997
replace PartyCloseness2=0 if QG3_Expanded==998
replace PartyCloseness2=.a if QG3_Expanded==.
label define PartyCloseness2 .a"Already missing" 0"Do not know/Prefer not to say" 1"Close to a party", replace
numlabel, add
tab PartyCloseness2, m
tab PartyCloseness2 TARGET2, m
bysort COUNTRY: tab PartyCloseness2 TARGET2, m
replace PartyCloseness2=1 if TARGET2==3
tab PartyCloseness2, m
* 	Only those who would vote for a party
gen PartyVote1=1
label var PartyVote1 "QG2 Recoded 1 - Only those who would vote for a party"
label val PartyVote1 PartyVote1
replace PartyVote1=0 if QG2==996
replace PartyVote1=0 if QG2==997
replace PartyVote1=0 if QG2==998
replace PartyVote1=.a if QG2==.
label define PartyVote1 .a"Already missing" 0"Not voting/Do not know/Prefer not to say" 1"Would vote for a party", replace
numlabel, add
tab PartyVote1, m
tab PartyVote1 TARGET2, m
bysort COUNTRY: tab PartyVote1 TARGET2, m
replace PartyVote1=1 if TARGET2==3
tab PartyVote1, m

* Integrated set of weights, comprising masses as well as elites 
* 	General population + Elites
gen GP_Weight_WithElites=gp_wt1_cap
label var GP_Weight_WithElites "GP Weights with Elite Weights Coded as 1"
label val GP_Weight_WithElites GP_Weight_WithElites
replace GP_Weight_WithElites=1 if TARGET2==3
numlabel, add
tab GP_Weight_WithElites, m
* 	Corrected for Internet users + Elites
gen IU_Weight_WithElites=int_wt1_cap
label var IU_Weight_WithElites "IU Weights with Elite Weights Coded as 1"
label val IU_Weight_WithElites IU_Weight_WithElites
replace IU_Weight_WithElites=1 if TARGET2==3
numlabel, add
tab IU_Weight_WithElites, m



***************
* 3) Country-level analyses
***************



* General European Integration
* 	Proportions
bysort COUNTRY: tab QE11_recoded if TARGET2==3
bysort COUNTRY: tab QE11_recoded if TARGET2==2 [aw=int_wt1_cap]
* 	Proportions, with alternative mass specifications
bysort COUNTRY: tab QE11_recoded if TARGET2==2 [aw=gp_wt1_cap]
bysort COUNTRY: tab QE11_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QE11_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap]
bysort COUNTRY: tab QE11_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QE11_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap]
* 	Averages
bysort COUNTRY: sum QE11_recoded if TARGET2==3, detail
bysort COUNTRY: sum QE11_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages, with alternative mass specifications
bysort COUNTRY: sum QE11_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QE11_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QE11_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap], detail
bysort COUNTRY: sum QE11_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QE11_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap], detail
* 	T-tests on averages, by country
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
* 	T-tests on averages, by country, with alternative mass specifications
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear

* Authority over economic policy
* 	Proportions
bysort COUNTRY: tab QB1_2_recoded if TARGET2==3
bysort COUNTRY: tab QB1_2_recoded if TARGET2==2 [aw=int_wt1_cap]
* 	Proportions, with alternative mass specifications
bysort COUNTRY: tab QB1_2_recoded if TARGET2==2 [aw=gp_wt1_cap]
bysort COUNTRY: tab QB1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QB1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap]
bysort COUNTRY: tab QB1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QB1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap]
* 	Averages
bysort COUNTRY: sum QB1_2_recoded if TARGET2==3, detail
bysort COUNTRY: sum QB1_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages, with alternative mass specifications
bysort COUNTRY: sum QB1_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QB1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QB1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap], detail
bysort COUNTRY: sum QB1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QB1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap], detail
* 	T-tests on averages, by country
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
* 	T-tests on averages, by country, with alternative mass specifications
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear

* Pooling of economic resources
* 	Proportions
bysort COUNTRY: tab QB1_3_recoded if TARGET2==3
bysort COUNTRY: tab QB1_3_recoded if TARGET2==2 [aw=int_wt1_cap]
* 	Proportions, with alternative mass specifications
bysort COUNTRY: tab QB1_3_recoded if TARGET2==2 [aw=gp_wt1_cap]
bysort COUNTRY: tab QB1_3_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QB1_3_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap]
bysort COUNTRY: tab QB1_3_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QB1_3_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap]
* 	Averages
bysort COUNTRY: sum QB1_3_recoded if TARGET2==3, detail
bysort COUNTRY: sum QB1_3_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages, with alternative mass specifications
bysort COUNTRY: sum QB1_3_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QB1_3_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QB1_3_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap], detail
bysort COUNTRY: sum QB1_3_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QB1_3_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap], detail
* 	T-tests on averages, by country
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
* 	T-tests on averages, by country, with alternative mass specifications
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear

* Authority over immigration policy
* 	Proportions
bysort COUNTRY: tab QC1_1_recoded if TARGET2==3
bysort COUNTRY: tab QC1_1_recoded if TARGET2==2 [aw=int_wt1_cap]
* 	Proportions, with alternative mass specifications
bysort COUNTRY: tab QC1_1_recoded if TARGET2==2 [aw=gp_wt1_cap]
bysort COUNTRY: tab QC1_1_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QC1_1_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap]
bysort COUNTRY: tab QC1_1_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QC1_1_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap]
* 	Averages
bysort COUNTRY: sum QC1_1_recoded if TARGET2==3, detail
bysort COUNTRY: sum QC1_1_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages, with alternative mass specifications
bysort COUNTRY: sum QC1_1_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QC1_1_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QC1_1_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap], detail
bysort COUNTRY: sum QC1_1_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QC1_1_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap], detail
* 	T-tests on averages, by country
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
* 	T-tests on averages, by country, with alternative mass specifications
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear

* Costs of providing asylum
* 	Proportions
bysort COUNTRY: tab QC1_2_recoded if TARGET2==3
bysort COUNTRY: tab QC1_2_recoded if TARGET2==2 [aw=int_wt1_cap]
* 	Proportions, with alternative mass specifications
bysort COUNTRY: tab QC1_2_recoded if TARGET2==2 [aw=gp_wt1_cap]
bysort COUNTRY: tab QC1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QC1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap]
bysort COUNTRY: tab QC1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap]
bysort COUNTRY: tab QC1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap]
* 	Averages
bysort COUNTRY: sum QC1_2_recoded if TARGET2==3, detail
bysort COUNTRY: sum QC1_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages, with alternative mass specifications
bysort COUNTRY: sum QC1_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QC1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QC1_2_recoded if TARGET2==2 & PartyCloseness2==1 [aw=int_wt1_cap], detail
bysort COUNTRY: sum QC1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=gp_wt1_cap], detail
bysort COUNTRY: sum QC1_2_recoded if TARGET2==2 & PartyVote1==1 [aw=int_wt1_cap], detail
* 	T-tests on averages, by country
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
* 	T-tests on averages, by country, with alternative mass specifications
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==1 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==2, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==2 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==3, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==3 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==4, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==4 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==5, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==5 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==6, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==6 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==7, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==7 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==8, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==8 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==9, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==9 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==10, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyCloseness2==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & COUNTRY==10 & PartyVote1==1, over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear



***************
* 4) Party-level analyses
***************



* General European integration
* 	Averages: mass level
bysort QG3_Expanded_Rec: sum QE11_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: mass level, with alternative specifications
bysort QG3_Expanded_Rec: sum QE11_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort QG2_Rec: sum QE11_recoded if TARGET2==2 [aw=int_wt1_cap], detail
bysort QG2_Rec: sum QE11_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "direct"
bysort COUNTRY Party_of_election: sum QE11_recoded if TARGET2==3, detail
sum QE11_recoded if TARGET2==3 & (Party_of_election==125|Party_of_election==136|Party_of_election==137|Party_of_election==163|Party_of_election==165), detail
sum QE11_recoded if TARGET2==3 & Party_of_election==123 & (Party_group==92|Party_group==100), detail
sum QE11_recoded if TARGET2==3 & (Party_of_election==50|Party_of_election==54), detail
sum QE11_recoded if TARGET2==3 & (Party_of_election==157|Party_of_election==180), detail
sum QE11_recoded if TARGET2==3 & Party_of_election==71 & (Party_group==31|Party_group==105), detail
sum QE11_recoded if TARGET2==3 & Party_of_election==74 & (Party_group==30|Party_group==98), detail
sum QE11_recoded if TARGET2==3 & (Party_of_election==158 | (Party_of_election==72 & Party_group==28)), detail
sum QE11_recoded if TARGET2==3 & (Party_of_election==70|Party_of_election==84), detail
* 	Here t-tests are only provided for an individual party, which serves as an example
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QE11_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QE11_recoded]_subpop_1=[QE11_recoded]_subpop_2
svyset, clear

* Authority over economic policy
* 	Averages: mass level
bysort QG3_Expanded_Rec: sum QB1_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: mass level, with alternative specifications
bysort QG3_Expanded_Rec: sum QB1_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort QG2_Rec: sum QB1_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
bysort QG2_Rec: sum QB1_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "indirect"
bysort QG3_Expanded_Rec: sum QB2_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: elite level, "indirect", with alternative specifications
bysort QG3_Expanded_Rec: sum QB2_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "direct"
bysort Party_of_election: sum QB1_2_recoded if TARGET2==3, detail
sum QB1_2_recoded if TARGET2==3 & (Party_of_election==125|Party_of_election==136|Party_of_election==137|Party_of_election==163|Party_of_election==165), detail
sum QB1_2_recoded if TARGET2==3 & Party_of_election==123 & (Party_group==92|Party_group==100), detail
sum QB1_2_recoded if TARGET2==3 & (Party_of_election==50|Party_of_election==54), detail
sum QB1_2_recoded if TARGET2==3 & (Party_of_election==157|Party_of_election==180), detail
sum QB1_2_recoded if TARGET2==3 & Party_of_election==71 & (Party_group==31|Party_group==105), detail
sum QB1_2_recoded if TARGET2==3 & Party_of_election==74 & (Party_group==30|Party_group==98), detail
sum QB1_2_recoded if TARGET2==3 & (Party_of_election==158 | (Party_of_election==72 & Party_group==28)), detail
sum QB1_2_recoded if TARGET2==3 & (Party_of_election==70|Party_of_election==84), detail
* 	Here t-tests are only provided for an individual party, which serves as an example
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_2_recoded]_subpop_1=[QB1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_2_recoded QB2_2_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QB1_2_recoded=QB2_2_recoded
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_2_recoded QB2_2_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QB1_2_recoded=QB2_2_recoded
svyset, clear

* Pooling of economic resources
* 	Averages: mass level
bysort QG3_Expanded_Rec: sum QB1_3_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: mass level, with alternative specifications
bysort QG3_Expanded_Rec: sum QB1_3_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort QG2_Rec: sum QB1_3_recoded if TARGET2==2 [aw=int_wt1_cap], detail
bysort QG2_Rec: sum QB1_3_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "indirect"
bysort QG3_Expanded_Rec: sum QB2_3_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: elite level, "indirect", with alternative specifications
bysort QG3_Expanded_Rec: sum QB2_3_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "direct"
bysort COUNTRY Party_of_election: sum QB1_3_recoded if TARGET2==3, detail
sum QB1_3_recoded if TARGET2==3 & (Party_of_election==125|Party_of_election==136|Party_of_election==137|Party_of_election==163|Party_of_election==165), detail
sum QB1_3_recoded if TARGET2==3 & Party_of_election==123 & (Party_group==92|Party_group==100), detail
sum QB1_3_recoded if TARGET2==3 & (Party_of_election==50|Party_of_election==54), detail
sum QB1_3_recoded if TARGET2==3 & (Party_of_election==157|Party_of_election==180), detail
sum QB1_3_recoded if TARGET2==3 & Party_of_election==71 & (Party_group==31|Party_group==105), detail
sum QB1_3_recoded if TARGET2==3 & Party_of_election==74 & (Party_group==30|Party_group==98), detail
sum QB1_3_recoded if TARGET2==3 & (Party_of_election==158 | (Party_of_election==72 & Party_group==28)), detail
sum QB1_3_recoded if TARGET2==3 & (Party_of_election==70|Party_of_election==84), detail
* 	Here t-tests are only provided for an individual party, which serves as an example
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QB1_3_recoded]_subpop_1=[QB1_3_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QB1_3_recoded QB2_3_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QB1_3_recoded=QB2_3_recoded
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QB1_3_recoded QB2_3_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QB1_3_recoded=QB2_3_recoded
svyset, clear

* Authority over immigration policy
* 	Averages: mass level, with alternative specifications
bysort QG3_Expanded_Rec: sum QC1_1_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: mass level, with alternative specifications
bysort QG3_Expanded_Rec: sum QC1_1_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort QG2_Rec: sum QC1_1_recoded if TARGET2==2 [aw=int_wt1_cap], detail
bysort QG2_Rec: sum QC1_1_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "indirect"
bysort QG3_Expanded_Rec: sum QC2_1_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: elite level, "indirect", with alternative specifications
bysort QG3_Expanded_Rec: sum QC2_1_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "direct"
bysort COUNTRY Party_of_election: sum QC1_1_recoded if TARGET2==3, detail
sum QC1_1_recoded if TARGET2==3 & (Party_of_election==125|Party_of_election==136|Party_of_election==137|Party_of_election==163|Party_of_election==165), detail
sum QC1_1_recoded if TARGET2==3 & Party_of_election==123 & (Party_group==92|Party_group==100), detail
sum QC1_1_recoded if TARGET2==3 & (Party_of_election==50|Party_of_election==54), detail
sum QC1_1_recoded if TARGET2==3 & (Party_of_election==157|Party_of_election==180), detail
sum QC1_1_recoded if TARGET2==3 & Party_of_election==71 & (Party_group==31|Party_group==105), detail
sum QC1_1_recoded if TARGET2==3 & Party_of_election==74 & (Party_group==30|Party_group==98), detail
sum QC1_1_recoded if TARGET2==3 & (Party_of_election==158 | (Party_of_election==72 & Party_group==28)), detail
sum QC1_1_recoded if TARGET2==3 & (Party_of_election==70|Party_of_election==84), detail
* 	Here t-tests are only provided for an individual party, which serves as an example
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_1_recoded]_subpop_1=[QC1_1_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_1_recoded QC2_1_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QC1_1_recoded=QC2_1_recoded
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_1_recoded QC2_1_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QC1_1_recoded=QC2_1_recoded
svyset, clear

* Costs of providing asylum
* 	Averages: mass level
bysort QG3_Expanded_Rec: sum QC1_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: mass level, with alternative specifications
bysort QG3_Expanded_Rec: sum QC1_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
bysort QG2_Rec: sum QC1_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
bysort QG2_Rec: sum QC1_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "indirect"
bysort QG3_Expanded_Rec: sum QC2_2_recoded if TARGET2==2 [aw=int_wt1_cap], detail
* 	Averages: elite level, "indirect", with alternative specifications
bysort QG3_Expanded_Rec: sum QC2_2_recoded if TARGET2==2 [aw=gp_wt1_cap], detail
* 	Averages: elite level, "direct"
bysort COUNTRY Party_of_election: sum QC1_2_recoded if TARGET2==3, detail
sum QC1_2_recoded if TARGET2==3 & (Party_of_election==125|Party_of_election==136|Party_of_election==137|Party_of_election==163|Party_of_election==165), detail
sum QC1_2_recoded if TARGET2==3 & Party_of_election==123 & (Party_group==92|Party_group==100), detail
sum QC1_2_recoded if TARGET2==3 & (Party_of_election==50|Party_of_election==54), detail
sum QC1_2_recoded if TARGET2==3 & (Party_of_election==157|Party_of_election==180), detail
sum QC1_2_recoded if TARGET2==3 & Party_of_election==71 & (Party_group==31|Party_group==105), detail
sum QC1_2_recoded if TARGET2==3 & Party_of_election==74 & (Party_group==30|Party_group==98), detail
sum QC1_2_recoded if TARGET2==3 & (Party_of_election==158 | (Party_of_election==72 & Party_group==28)), detail
sum QC1_2_recoded if TARGET2==3 & (Party_of_election==70|Party_of_election==84), detail
* 	Here t-tests are only provided for an individual party, which serves as an example
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & (QG3_Expanded_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded if TARGET2>1 & (QG2_Rec==1 | Party_of_election==1), over (TARGET2)
test [QC1_2_recoded]_subpop_1=[QC1_2_recoded]_subpop_2
svyset, clear
svyset [pw=IU_Weight_WithElites]
svy: mean QC1_2_recoded QC2_2_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QC1_2_recoded=QC2_2_recoded
svyset, clear
svyset [pw=GP_Weight_WithElites]
svy: mean QC1_2_recoded QC2_2_recoded if TARGET2==2 & QG3_Expanded_Rec==1
test QC1_2_recoded=QC2_2_recoded
svyset, clear
